package com.education.service.edu.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.education.service.edu.entity.Teacher;
import com.baomidou.mybatisplus.extension.service.IService;
import com.education.service.edu.entity.query.TeacherQuery;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 讲师 服务类
 * </p>
 *
 * @author Lance
 * @since 2020-06-16
 */
public interface TeacherService extends IService<Teacher> {

    /**
     * 分页
     * @param page
     * @param limit
     * @param teacherQuery
     * @return
     */
    Page<Teacher> selectPage(Long page, Long limit, TeacherQuery teacherQuery);

    /**
     * 根据讲师 ID 删除头像
     * @param id
     * @return
     */
    boolean removeAvatarById(String id);

    /**
     * 根据关键字快熟查询对应讲师信息
     * @param key
     * @return
     */
    List<Map<String, Object>> selectNameListByKey(String key);

    /**
     * 根据讲师id获取讲师详情页数据
     * @param id
     * @return
     */
    Map<String, Object> selectTeacherInfoById(String id);

    /**
     * 获取首页推荐前4条讲师数据
     * @return
     */
    List<Teacher> selectHotTeacher();
}
